﻿
@{
    ViewBag.Title = "List";
    Layout = "~/Areas/ShopManage/Views/Shared/_Layout.cshtml";
}
<style type="text/css">
    .search-order {
    }

    .search-order-table td {
        padding: 5px;
    }
</style>
<div class="search-order">
    <table class="layui-form search-order-table" align="center">
        <tr>
            <td align="right">日期:</td>
            <td>
                <input type="text" class="layui-input" id="txt-Search-Date" maxlength="10"
                       style="width: 100px;" readonly="readonly" placeholder="yyyy-MM-dd" />
            </td>
            <td>
                <button type="button" id="btn-Search" class="layui-btn layui-btn-normal">
                    <i class="layui-icon layui-icon-search"></i>查 询
                </button>
            </td>
        </tr>
        <tr>
            <td align="right">订单号:</td>
            <td colspan="2">
                <input type="text" class="layui-input" id="txt-Search-OrderNo" maxlength="25"
                       style="width: 180px;" />
            </td>
        </tr>
        <tr>
            <td align="right">买家:</td>
            <td colspan="2">
                <input type="text" class="layui-input" id="txt-Search-Buyer" maxlength="10"
                       style="width: 100px;" />
            </td>
        </tr>
        <tr>
            <td align="right">卖家:</td>
            <td colspan="2">
                <input type="text" class="layui-input" id="txt-Search-Seller" maxlength="10"
                       style="width: 100px;" />
            </td>
        </tr>
        <tr>
            <td align="right">订单状态:</td>
            <td colspan="2">
                <select id="sel-Search-OrderState" style="width: 100px;">
                    <option value="" selected="selected">请选择</option>
                    <option value="0">未付款</option>
                    <option value="1">已付款</option>
                    <option value="2">已收款</option>
                    <option value="3">已提货</option>
                </select>
            </td>
        </tr>
    </table>
</div>
<style type="text/css">
    .orderStatistics {
        padding-top: 10px;
        width: 90%;
        margin: 0px auto;
    }

    .orderStatisticsTable {
        border: 1px solid #dddddd;
    }

        .orderStatisticsTable td {
            padding: 5px;
            font-size: 16px;
        }
</style>
<div class="orderStatistics" id="OrderStatistics">
    <table class="orderStatisticsTable" align="center">
        <tr>
            <td colspan="4" align="center" valign="middle">统计信息</td>
        </tr>
        <tr>
            <td>订单总数:</td>
            <td><label id="OrderStatistics-Count">0</label></td>
            <td>订单总金额:</td>
            <td><label id="OrderStatistics-Sum">0</label></td>
        </tr>
    </table>
</div>
<style type="text/css">
    .list {
        width: 95%;
        margin: 0px auto;
        margin-top: 20px;
    }

    .list-table {
        border: 1px solid #dddddd;
        width: 90%;
        font-size: 16px;
        margin-bottom: 20px;
    }

        .list-table tr {
            border-bottom: 1px dashed #dddddd;
        }

        .list-table td {
            height: 25px;
            padding: 5px;
        }

    .order-state-notPaied {
        color: red;
    }

    .order-state-paied {
        color: green;
    }

    .order-state-recv {
        color: green;
    }

    .order-state-fetch {
        color: bisque;
    }

    .buyer {
        color: green;
    }

    .seller {
        color: red;
    }

    .amount {
        color: brown;
        font-weight: 800;
    }

    .released {
        color: green;
    }

    .not-release {
        color: red;
    }
</style>
<div class="list layui-form" id="OrderList">

</div>
<script type="text/html" id="OrderListTable">
    <table class="list-table" align="center">
        <tr>
            <td align="right">订单号:</td>
            <td><label>{{OrderNo}}</label></td>
        </tr>
        <tr>
            <td align="right">产品名称:</td>
            <td><label>{{ProductName}}</label></td>
        </tr>
        <tr>
            <td align="right">下单时间:</td>
            <td><label>{{CreateTime}}</label></td>
        </tr>
        <tr>
            <td align="right">买家:</td>
            <td><label class="buyer">{{Buyer}}</label></td>
        </tr>
        <tr>
            <td align="right">卖家:</td>
            <td><label class="seller">{{Seller}}</label></td>
        </tr>
        <tr>
            <td align="right">金额:</td>
            <td><label class="amount">{{Amount}}</label></td>
        </tr>
        <tr>
            <td align="right">状态:</td>
            <td><label>{{State}}</label></td>
        </tr>
        <tr>
            <td align="right">发布状态:</td>
            <td><label>{{Visible}}</label></td>
        </tr>
        <tr>
            <td>&nbsp;&nbsp;</td>
            <td>
                <a class="layui-btn layui-btn-sm layui-bg-purple view-Payment"
                   orderId="{{OrderId}}" paymentPaths="{{PaymentVoucherImagePath}}">付款信息</a>
                <a class="layui-btn layui-btn-sm layui-bg-red update-order"
                   orderId="{{OrderId}}"
                   style="margin-left: 5px;">修改订单</a>
            </td>
        </tr>
    </table>
</script>

<script type="text/html" id="ViewPaymentDlg">
    <div class="layui-carousel">
        <div carousel-item>
        </div>
    </div>
</script>

<style type="text/css">
    .table-UpdateOrderDlg td {
        padding: 5px;
        font-size: 16px;
    }
</style>
<script type="text/html" id="UpdateOrderDlg">
    <form class="layui-form" style="padding: 10px;">
        <table align="center" class="table-UpdateOrderDlg">
            <tr>
                <td align="right">订单号:</td>
                <td colspan="2"><label id="lb-UpdateOrderDlg-OrderNo"></label></td>
            </tr>
            <tr>
                <td align="right">买家:</td>
                <td><label class="buyer" id="lb-UpdateOrderDlg-Buyer"></label></td>
                <td>
                    <a class="layui-btn layui-btn-sm layui-bg-cyan "
                       id="btn-UpdateOrderDlg-UpdateBuyer">更改买家</a>
                </td>
            </tr>
            <tr>
                <td align="right">卖家:</td>
                <td><label class="seller" id="lb-UpdateOrderDlg-Seller"></label></td>
                <td>
                    <a class="layui-btn layui-btn-sm layui-bg-cyan "
                       id="btn-UpdateOrderDlg-UpdateSeller">更改卖家</a>
                </td>
            </tr>
            <tr>
                <td align="right">金额:</td>
                <td colspan="2">
                    <input type="number" class="layui-input" maxlength="12"
                           id="txt-UpdateOrderDlg-Amount"
                           step="0.01" lay-affix="number"
                           min="1000" max="15000" value="" />
                </td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;</td>
                <td colspan="2">
                    <button type="button" id="btn-UpdateOrderDlg-OK" class="layui-btn layui-btn-normal">
                        <i class="layui-icon layui-icon-ok"></i>确 定
                    </button>
                </td>
            </tr>
        </table>
    </form>
</script>

<style type="text/css">
    .selectUserDlg-table {
        width: 100%;
        height: 100%;
    }

        .selectUserDlg-table td {
            padding: 5px;
        }

    .user-list {
        border: 1px solid #dddddd;
        height: 250px;
        overflow: scroll;
    }

        .user-list label {
            font-size: 18px;
            margin-left: 10px;
        }

    .selected-user {
        color: red;
        font-size: 16px;
    }
</style>
<script type="text/html" id="SelectUserDlg">
    <form class="layui-form" style="padding: 10px;">
        <table class="selectUserDlg-table">
            <tr>
                <td align="right" width="90">姓名:</td>
                <td>
                    <input type="text" class="layui-input" id="txt-SelectUserDlg-Name" maxlength="10" />
                </td>
                <td>
                    <a class="layui-btn layui-btn-normal layui-bg-orange layui-icon layui-icon-search"
                       id="btn-SelectUserDlg-Search">搜 索</a>
                </td>
            </tr>
            <tr>
                <td align="right">已选择成员:</td>
                <td colspan="2"><label class="selected-user" id="lb-SelectUserDlg-Name2">未选择</label></td>
            </tr>
            <tr>
                <td align="right" valign="top">成员列表:</td>
                <td valign="top" colspan="2">
                    <div class="user-list" id="SelectUserDlg-UserList">

                    </div>
                </td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;</td>
                <td colspan="2">
                    <button type="button" id="btn-SelectUserDlg-OK" class="layui-btn layui-btn-normal">
                        <i class="layui-icon layui-icon-ok"></i>确 定
                    </button>
                </td>
            </tr>
        </table>
    </form>
</script>

<script type="text/javascript" src="~/Static/Js/shopmanage/order.js?rand=0123456789"></script>